#!/bin/sh
#
# This script re-enumerates the currently connected USB devices supported by
# this driver package.  This simulates the devices being unplugged then plugged
# in again, allowing OS X to auto-create printer queues for those devices.
# This script also creates (if necessary) the shared toolbox settings file and
# ensures its permissions are correct.
#
# Copyright (C) Silverbrook Research 2011 - All rights reserved.
#

$PACKAGE_PATH/Contents/Resources/UnityReset 0x17ef 0x5504

if [ ! -d "/Library/Application Support/Lenovo/RJ610N" ]
then
    mkdir -p "/Library/Application Support/Lenovo/RJ610N"
fi
if [ ! -f "/Library/Application Support/Lenovo/RJ610N/running-toolbox.plist" ]
then
    echo "" > "/Library/Application Support/Lenovo/RJ610N/running-toolbox.plist"
fi
chmod 666 "/Library/Application Support/Lenovo/RJ610N/running-toolbox.plist"
